﻿var version = "2019.11.23"
function loadcss(url, islocal) {
    if (islocal) {
        url += "?version=" + version;
    }
    document.write('<link rel="stylesheet" href= ' + url + '></link>');
}

function GetProjectName() {
    var loc = window.location,
        host = loc.hostname,
        protocol = loc.protocol,
        port = loc.port ? (':' + loc.port) : '';
    var path = location.pathname;

    if (path.indexOf('/') === 0) {
        path = path.substring(1);
    }

    var mypath = '/' + path.split('/')[0];
    path = (mypath != undefined ? mypath : ('/' + loc.pathname.split('/')[1])) + '/';
    return path;
}

var applicaitoncontext = GetProjectName() + 'Resource';

var elementui = applicaitoncontext + "/plugin/elementui/index.css";
var common = applicaitoncontext + "/css/fe.common.css";
var dialog = applicaitoncontext + "/component/dialog/fastdialog.css";
var table = applicaitoncontext + "/component/table/index.css";
var tree = applicaitoncontext + "/component/tree/index.css";
var upload = applicaitoncontext + "/component/upload/index.css";

loadcss(elementui, true);
loadcss(common, true);
loadcss(dialog, true);
loadcss(table, true);
loadcss(tree, true);
loadcss(upload, true);